import request from '@/utils/request'
/**
 * 获取组织架构数据
 */


export function  getDepartment() {
    return request({
        url:'/company/department',

    })
}

export function  getMangerList(){
    return request({
        url:'sys/user/simple'
    })
}


/**
 * 
 * 
 * 新增组织
 */
export function  addDepartment(data){
    return request({
        url:'company/department',
        method:'post',
        data
    })
}


/**
 * 获取部门详情
 * 
 */

export function  getDepartmentDetail(id){
    return request({
        url:`company/department/${id}`
    })
}


/**
 * 
 * 
 * 编辑组织，更新部门接口
 */

export function  updateDepartment(data){
    return request({
        url:`company/department/${data.id}`,
        method:'put',
        data
    })
}


/**
 * 
 * 
 * 删除组织
 */

export function  deleteDepartment(id){
    return request({
        url:`company/department/${id}`,
        method:'delete'
    })
}